package com.dianping.abel.enums;

/**
 * 服务返回状态枚举
 * @author xiachao
 * @date 2018/12/20
 */
public enum ResponseEnum {
    SUCCESS(200, "操作成功"),
    HALF_SUCCESS(201,"操作成功，但有错误提示"),
    NOT_LOGIN(400, "请先登录"),
    PARAM_ILLEGAL(401, "参数非法"),
    REPEAT_ACTION(402, "重复操作"),
    FAIL(403, "操作失败"),
    NOT_EXIST(404, "数据不存在"),
    NOT_IN_GROUP(405, "不存在分组"),
    NO_POWER(406, "没有权限"),
    EXCEPTION(500, "系统异常");

    private int code;
    private String msg;

    ResponseEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
